﻿@model PersonalWebsite.Models.Profile

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Profile</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.ProfileDescription)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.ProfileDescription)
            @Html.ValidationMessageFor(model => model.ProfileDescription)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BasicProfile)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.BasicProfile)
            @Html.ValidationMessageFor(model => model.BasicProfile)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Information)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Information)
            @Html.ValidationMessageFor(model => model.Information)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Mutter)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Mutter)
            @Html.ValidationMessageFor(model => model.Mutter)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

<script>
    var textBoxes = document.getElementsByClassName("text-box");
    for (var i = 0; i < textBoxes.length; i++) {
        textBoxes[i].style.width = "100%";
        textBoxes[i].style.height = "25px";
        textBoxes[i].className += " layui-input";
    }

    var textAreas = document.getElementsByTagName("textarea");
    for (var i = 0; i < textAreas.length; i++) {
        textAreas[i].className += "layui-textarea";
    }
</script>